<script>
/**
 * @desc app初始化时显示的loading层,有logo的那个
 */

import logo from '@/assets/icons/logo.png'

export default {
  name: 'the-onload-layer',
  props: { show: Boolean },
  data: () => ({ logo })
}
</script>

<template>
  <div :class="[$sty.layer, show?'':$sty.hide]">
    <img
      :class="$sty.logoImg"
      :src="logo"
    >
  </div>
</template>

<style lang="scss" module>
.layer {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 20;
  display: flex;
  justify-content: center;
  align-items: center;
  background: linear-gradient($main-yellow 0%, $main-red 100%);
  transition: all 0.5s;
  opacity: 1;
  visibility: visible;
}

.hide {
  opacity: 0;
  visibility: hidden;
}

.logoImg {
  width: 200rpx;
  height: 200rpx;
}
</style>

